/* eslint-disable no-restricted-globals */
import dayjs from "dayjs";
const transTime = (time: string | number | Date | dayjs.Dayjs | null | undefined) => {
    self.postMessage(dayjs(time).format('YYYY-MM-DD hh:mm:ss'));
    setTimeout(() => {
        transTime(new Date().getTime());
    }, 1000);
};
self.onmessage = (e) => {
    transTime(new Date().getTime());
};
console.log('this',this,self,this === self);